//
//  NearbyPhotoCollectionViewCell.m
//  CommonFrame
//
//  Created by Bang-guo on 15/7/23.
//  Copyright (c) 2015年 guobang. All rights reserved.
//

#import "NearbyPhotoCollectionViewCell.h"

@implementation NearbyPhotoCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
        
    }
    return self;
}

-(void)createSubViews {
    
    self.photoImageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, (WIDTH - 40) / 3, (WIDTH - 40) / 3)];
    [self.contentView addSubview:self.photoImageV];

    
}

-(void)setPhoto:(NearbyPhoto *)photo {
    
    if (_photo != photo) {
        
        _photo = photo;
    }
    
    [self.photoImageV sd_setImageWithURL:[NSURL URLWithString:photo.photo_s] placeholderImage:[UIImage imageNamed:@"icon1024.png"]];
    
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
